package com.hontech.bv.codec


fun encodeUint8(buf: ByteArray, offset: Int, value: Int) {
    buf[offset] = value.toByte()
}

fun encodeUint16(buf: ByteArray, offset: Int, value: Int) {
    buf[offset] = (value shr 8).toByte()
    buf[offset + 1] = value.toByte()
}

fun encodeUint32(buf: ByteArray, offset: Int, value: Int) {
    buf[offset] = (value shr 24).toByte()
    buf[offset + 1] = (value shr 16).toByte()
    buf[offset + 2] = (value shr 8).toByte()
    buf[offset + 3] = value.toByte()
}


